<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
			window.onload=function(){
				setInterval("changeImg()",1000);
			}
			var i=0;
			function changeImg(){
				i++;
				document.getElementById("img1").src="../img/"+i+".jpg";
				if(i==3){
					i=0;
				}
			}
		</script></head>
<body >
<img src="../img/1.jpg" id="img1"/>
</body>
</html>